package chatGUI;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JOptionPane;


/**
 * @author Michael & Pierre
 */
/**
 * Action Listener for click on disconnected view's Connection button
 */
public class ConnectionClickListener implements ActionListener {

	/**
	 * To keep track of the calling instance of the platform-specific GUI
	 */
	private JavaGUI chatGUILoopback;

	/**
	 * Constructor to memorize the calling platform-specific GUI address
	 * @param gui
	 */
	public ConnectionClickListener(JavaGUI gui) {
		this.chatGUILoopback = gui;
	}
	
	/**
	 * Calls platform-specific GUI's connect method
	 * @param arg0
	 */
	@Override
	public void actionPerformed(ActionEvent arg0) {
		chatGUILoopback.connect();
	}

}
